﻿
Public Class trycatch
    Public Const errorName As String = "e"

    Public Shared Function invoke(ByVal tryaction As String, Optional ByVal catchaction As String = Nothing, _
                                  Optional ByRef actionTarget As String = Nothing) As String
        actionTarget += "try{" + tryaction + ";}catch(" + errorName + "){" + catchaction + ";}"
        Return actionTarget
    End Function
End Class
